/*
 * @Descripttion: 胡腾辉 | feico
 * @version: V1.0
 * @Author: feico
 * @Date: 2022-02-22 11:54:29
 * @LastEditors: feico
 * @LastEditTime: 2022-02-22 12:46:57
 */
import request from '../../utils/request'
import { USER_INFO } from '../constants'

/**
 * 获取用户信息
 */
export const userInfoAc=(data)=>({
type:USER_INFO,
data
})
 export const userInfo = () => {
    return async (dispatch) => {
      const { data:{data}} = await request.get('/user/profile')
      dispatch(userInfoAc(data))
    }
  }